package com.example.design_pattern.observer.javajdk;


/**
 * Created by SQ_BXZ on 2019-02-16.
 *  使用Java自带的工具包 实现观察者模式
 */
public class Test {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
//        ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
        CurrentConditionsDisplay display = new CurrentConditionsDisplay(weatherData);
        weatherData.setMeasurements(80, 65, 30.4f);
        weatherData.setMeasurements(82, 70, 29.2f);
        weatherData.setMeasurements(78, 90, 29.2f);
    }
}
